import os
import site
import sys

sys.argv.append("--backend")
sys.argv.append('directml')

site.addsitedir('E:\\python_test\\sd-amd\\__pypackages__\\3.10\\lib')
current_path = os.path.dirname(os.path.abspath(__file__))
os.environ["TRANSFORMERS_CACHE"] = os.path.join(current_path, "transformers-cache")
os.environ[
    "WEBUI_EXTENSIONS_INDEX"] = "https://gitee.com/ZnMaYun/stable-diffusion-webui-extensions/raw/master/index.json"

from webui import webui

webui()

# from launch import prepare_environment, start
#
# # prepare_environment()
# start()
